package com.woniu.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
	
	public static Long parseDateString(String time,String pattern) throws ParseException {
		 SimpleDateFormat sd = new SimpleDateFormat(pattern);
		 return sd.parse(time).getTime();
	}
	
	public static String parseDateLong(Long time,String pattern) {
		SimpleDateFormat sd = new SimpleDateFormat(pattern);
		return sd.format(new Date(time));
	}

}
